package com.qianyu.project.web.controller.smj;

import com.qianyu.project.service.smj.smjRealnameService;
import com.qianyu.project.utils.Result;
import com.qianyu.project.utils.ResultTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/smj_realname")
public class smjRealnameController {
    @Autowired
    private smjRealnameService rs;

    @GetMapping("/getprofessions")
    public List<Map<String,Object>> getprofessions(){
        return rs.getprofessions();
    }

    @GetMapping("")
    public void AddRealname(String name,String sfz,String profession,String p_id,String commit,String apply_date,String attach_ids,String attach_ids2){
        rs.AddRealname( name, sfz, profession, p_id, commit, apply_date, attach_ids, attach_ids2);
    }

    @GetMapping("/listrealname")
    public Result ListFragmentary(@RequestParam Map<String,String> params){
        Map<String, Object> map =new HashMap<>();
        //查询所有项目类型
        //查询所有项目
        map.put("data", rs.ListFragmentary(params));
        return ResultTool.success(map);
    }
}
